package com.ruike.service.impl;

import com.ruike.mapper.TeacherMapper;
import com.ruike.pojo.Teacher;
import com.ruike.service.TeacherService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author 吴泽胜
 * @FileName TeacherServiceImpl
 * @date 2020-11-18 6:42 下午
 * @Software: IntelliJ IDEA
 */
@Service
public class TeacherServiceImpl implements TeacherService {

    @Autowired(required = false)
    private TeacherMapper teacherMapper;

    @Override
    public void addTeacher(Teacher teacher) {
        teacherMapper.addTeacher(teacher);
    }

    @Override
    public Teacher findTeacherByteacherIdAndPassword(Teacher teacher) {
        return teacherMapper.findTeacherByteacherIdAndPassword(teacher);
    }

    @Override
    public Teacher deleteTeacherByteacherId(Integer id) {
        return teacherMapper.deleteTeacherByteacherId(id);
    }

    @Override
    public void updataTeacher(Integer id) {
        teacherMapper.updataTeacher(id);
    }

    @Override
    public Teacher findTeacherByteacherId(String teacher_id) {
        return teacherMapper.findTeacherByteacherId(teacher_id);
    }

    @Override
    public Teacher findTeacherByNickName(String NickName) {
        return teacherMapper.findTeacherByNickName(NickName);
    }

    @Override
    public List<Teacher> findTeacherListByNickName(String NickName) {
        return teacherMapper.findTeacherListByNickName(NickName);
    }
}
